Device-to-device (Device-to-Device, D2D) communication is a technology that allows terminals to communicate with each other directly by reusing cell resources under system control. In a D2D communication process, to ensure that a terminal can send or receive information accurately, devices performing D2D communication need to be in a synchronized state.
In the prior art, user equipments (User Equipment, UE) are usually classified based on coverage. UE located in coverage (In-coverage, IC) of a synchronization source selects the synchronization source as a synchronization reference device of the UE; and UE located out of coverage (Out-of-coverage, OOC) of the synchronization source selects an adjacent UE with a highest priority as a synchronization reference device of the UE. Specifically, as shown in FIG. 1, UE 4 just moves to the OOC from the IC, and a specific process of selecting a synchronization reference device by the UE 4 is as follows:
101. The UE 4 receives synchronization information sent by surrounding UE 2 and UE 3.
102. The UE 4 determines priorities of the UE 2 and the UE 3 based on the received synchronization information, and determines that the UE 3 has a higher priority than the UE 2.
103. The UE 4 selects the UE 3 as the synchronization reference device.
When selecting the synchronization reference device, the UE 4 considers only the UE 2 and the UE 3. If both the UE 2 and the UE 3 are located OOC, or if priorities of both the UE 2 and the UE 3 are relatively low, the method in which the UE 4 selects a device with a higher priority from the UE 2 and the UE 3 as the synchronization reference device is not accurate.